package com.yilu.driver.mvp.contract;

import com.is.common.base.BaseModel;
import com.is.common.base.BasePresenter;
import com.is.common.base.BaseView;
import com.is.common.retrofitrxcache.RxCacheResult;
import com.yilu.driver.entity.DeleteTraineeResponse;
import com.yilu.driver.entity.TraineeDropResponse;
import com.yilu.driver.entity.TraineeInfoResponse;

import org.json.JSONObject;

import rx.Observable;


/**
 * @author Administrator
 * @date 2017/4/12 0012
 */

public interface TraineeInfoContract {
    interface Model extends BaseModel {
        //查看学员详情
        Observable<RxCacheResult<TraineeInfoResponse>> getTraineeInfo(JSONObject json);

        //学员退学
        Observable<RxCacheResult<TraineeDropResponse>> dropOutTrainee(JSONObject json);

        //删除学员
        Observable<RxCacheResult<DeleteTraineeResponse>> deleteTrainee(JSONObject json);
    }

    interface View extends BaseView {
        //返回学员详情
        void returnTraineeInfo(TraineeInfoResponse traineeInfoResponse);

        //返回退学状态
        void returnDropOutTrainee(TraineeDropResponse traineeDropResponse);

        //返回删除状态
        void returnDeleteTrainee(DeleteTraineeResponse deleteTraineeResponse);
    }

    abstract class Presenter extends BasePresenter<View, Model> {
        //发起查看学员详情请求
        public abstract void getTraineeInfo(JSONObject json);

        //发起学员退学请求
        public abstract void dropOutTrainee(JSONObject json);

        //发起删除学员请求
        public abstract void deleteTrainee(JSONObject json);
    }
}
